@mixin flash($color) {
  background: $color;
  color: darken($color, 60);

  a {
    color: darken($color, 70);

    &:hover {
      color: darken($color, 90);
    }
  }
}

%flash-base {
  font-weight: bold;
  margin-bottom: $base-spacing / 2;
  padding: $base-spacing / 2;
}

%flash-alert {
  @extend %flash-base;
  @include flash($alert-color);
}

%flash-error {
  @extend %flash-base;
  @include flash($error-color);
}

%flash-notice {
  @extend %flash-base;
  @include flash($notice-color);
}

%flash-success {
  @extend %flash-base;
  @include flash($success-color);
}
